package com.sc.nft.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.AllArgsConstructor;
import lombok.Getter;
@AllArgsConstructor
@Getter
public enum DigitalMarketTypeEnum {

    DERIVE(1, "衍生藏品"),
    COPYRIGHT(2, "版权藏品"),
    ECOLOGY(3, "生态孵化"),

            ;

    @EnumValue
    private int code;

    private String description;


    public static DigitalMarketTypeEnum getMarketTypeEnum(Integer code) {
        DigitalMarketTypeEnum[] values = values();
        for (DigitalMarketTypeEnum v : values) {
            if (v.getCode() == code) {
                return v;
            }
        }
        return null;
    }
}
